package org.dizem.groupon.action;

import com.opensymphony.xwork2.ActionContext;

import java.util.Map;

import static org.dizem.groupon.Constants.SESSION_USERNAME;
import static org.dizem.groupon.Constants.SESSION_USER_TYPE;

/**
 * User: dizem@126.com
 * Time: 11-7-1 下午8:11
 */
public class LogoutAction {

	public String execute() throws Exception {
		Map<String, Object> session = ActionContext.getContext().getSession();
		session.remove(SESSION_USERNAME);
		session.remove(SESSION_USER_TYPE);
		return "success";
	}
}
